﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Portal.Code
{
    public class CategoryManager
    {
        public static List<int> GetTopHotCategories()
        {
            return new List<int> { 1, 2, 3, 4 };
            //using (var db = new CompanyDicContext())
            //{
            //    var query = from p in
            //                    (from t in db.UserTracks
            //                     join o in db.Organizations on t.OrgId equals o.Id
            //                     select new { o.CategoryId, OrgId = t.Id })
            //                group p by p.CategoryId into q
            //                orderby q.Count() descending
            //                select new
            //                           {
            //                               CategoryId = q.Key,
            //                               Count = q.Select(r => r.OrgId).Count(),
            //                           };

            //    var list = query.ToList();
            //}
        }
    }
}